﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace PackToKindle
{
    class SimpleStorage : IBookStorage
    {
        public void AddFile(FileInfo file)
        {
            CurrentSize += file.Length;
            _fileList.Add(file.FullName);
        }

        public long CurrentSize
        {
            get;
            private set;
        }

        public IEnumerable<string> Zip()
        {
            var result = _fileList;

            // Clear files list.
            _fileList = new List<string>();

            return result;
        }

        private List<string> _fileList = new List<string>();
    }
}
